package com.wxjfh.servlet;

import org.apache.commons.io.IOUtils;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;

@WebServlet(urlPatterns = "/showheader")
public class ShowheaderServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        InputStream in = new FileInputStream(new File("D:\\uploader\\OIP-C.jpg"));
//        InputStream in = new FileInputStream("D:\\uploader\\OIP-C.jpg");
        OutputStream out = resp.getOutputStream();
        IOUtils.copy(in,out);

    }
}
